Improve licensing support#602
Closed
ngie-eign wants to merge 3 commits into
Closed
Conversation
Prior to this change, the `license_id` API would return a license or `None` in the event that the file had an identifiable license or does not have a license that could be identified. This change modifies the `license_id` API to better match the other identify APIs: after this change a set of 0 or more licenses should be returned. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
A lot of source code uses SPDX IDs instead of full license text for brevity. Support the shorter ID format with the license_id* API. This change renames the `license_id` API to `license_ids` for clarity. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
e0b56d4 to
570e535
Compare
This change adds a new option, `--tag-type`, which allows one to identify by either file type or license type. This exposes the `identify.license_ids(..)` API for public consumption on the CLI. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
718e6d4 to
d0f15b7
Compare
Member
|
please discuss features before wasting time on them |
Contributor
Author
This project doesn't have a |
Member
|
an issue. with use cases and backward compatibility. standard open source practice really |
Contributor
Author
Well... maybe the default for simple GitHub projects (try filing feature requests/defects for some projects like FreeBSD or OpenSSL). I filed #603 , #604 , and #605 to help track what I was trying to address in this PR :). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change does 3 main things:
identify.license_id(..)'s API contract to match theidentify.tags_from_path(..)andidentify.tags_from_filename(..)APIs.identify-cli.This change makes it easier to identify licenses in source files without having to invoke the API manually.